#include "hplcqinfinepumpsendpacket.h"
#include "hplcqinfinepumpprotocoldata.h"
#include "common/hplcqinfinepfcid.h"
#include "common/hplcqinfinemakepacket.h"

namespace hplc
{
namespace qinfine
{

HplcQinfinePumpSendPacket::HplcQinfinePumpSendPacket(HplcQinfinePumpProtocolData &data, QObject *parent)
    : HplcQinfineSendCommonPacket (data, parent)
{

}

HplcQinfinePumpSendPacket::~HplcQinfinePumpSendPacket()
{

}

void HplcQinfinePumpSendPacket::setFlow(float flow)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_FLOW), flow);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getFlow()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_FLOW));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setFlowPercent(quint8 percent)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_FLOW_PERCENT), percent);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getFlowPercent()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_FLOW_PERCENT));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPressMin(float press)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PRESS_MIN), press);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPressMin()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PRESS_MIN));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPressMax(float press)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PRESS_MAX), press);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPressMax()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PRESS_MAX));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPressWarning(float press)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PRESS_WARNING), press);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPressWarning()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PRESS_WARNING));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setStartStop(quint8 flag)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_START_STOP), flag);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getStartStop()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_START_STOP));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPauseRestore(quint8 flag)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PAUSE_RESTORE), flag);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPauseRestore()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PAUSE_RESTORE));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPurge(quint8 flag)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PURGE), flag);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPurge()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PURGE));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPurgeFlow(float flow)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PURGE_FLOW), flow);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPurgeFlow()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PURGE_FLOW));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPurgeTime(quint8 time)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PURGE_TIME), time);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPurgeTime()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PURGE_TIME));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPressZero()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PRESS_ZERO));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPressZeroVoltage()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PRESS_ZERO));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPressUploadFreq(quint8 factor)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PRESS_UPLOAD_FREQ), factor);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPressUploadFreq()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PRESS_UPLOAD_FREQ));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPressCompen(quint8 flag)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_FLOW_PRESS_COMPEN), flag);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPressCompen()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_FLOW_PRESS_COMPEN));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setMode(quint8 mode)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_MODE), mode);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getMode()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_MODE));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setPress(float press)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_PRESS), press);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getPress()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_PRESS));
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::setRunMode(quint8 mode)
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(SET_PFC(PFC_PUMP_RUNMODE), mode);
    m_d->m_checker->sendRetry();
}

void HplcQinfinePumpSendPacket::getRunMode()
{
    HplcQinfinePumpProtocolData *m_d = static_cast<HplcQinfinePumpProtocolData*>(this->m_d);
    m_d->m_maker->makePacket(GET_PFC(PFC_PUMP_RUNMODE));
    m_d->m_checker->sendRetry();
}

} // qinfine
} // hplc
